package judesart.app.client.controller;

import judesart.app.domain.Artist;
import judesart.app.shared.ValidationException;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("profile")
public interface ProfileController extends RemoteService
{
    public static class Util
    {
        private static ProfileControllerAsync instance;

        public static ProfileControllerAsync getInstance()
        {
            if (instance == null)
            {
                instance = GWT.create(ProfileController.class);
            }
            return instance;
        }
    }

    Artist getArtist();

    Artist createArtist(Artist artist) throws ValidationException;

    Artist updateArtist(Artist artist) throws ValidationException;

    void deletePhotoFromArtist(Long artistId, Long imageId);

    Artist findArtistByUserId(Long userId);
}
